<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .ul {
            background-color: cadetblue;
            list-style: none;
            letter-spacing: -8px
        }

        li {
            background-color: aqua;
            display: inline-block;
            letter-spacing: normal;
        }
    </style>
</head>

<body>
    <form name="form1" method="post" action="">
        <select id="project" onchange="changeSelect()" style="width:100px; margin-left:15px;">
            <option value="0">请选择项⽬</option>
            <option value="1">A</option>
            <option value="2">B</option>
        </select>
        <select id="area" style="width:100px; margin-left:15px;">
            <option value="">请选择区域</option>
        </select>
    </form>
    <script type="text/javascript">
        var area = [
            ['x', 'y', 'z'], // 对应A
            ['m', 'n'], // 对应B
        ];
        function changeSelect() {
            //获得项⽬下拉框的对象
            var slt_project = document.querySelector('#project')
            //获得升级区域下拉框的对象
            var slt_area = document.querySelector('#area')
            //document.form1.area;
            //得到项⽬对应的升级区域数组
            var project_area = area[slt_project.selectedIndex - 1];
            //清空升级区域下拉框，仅留提⽰选项
            slt_area.length = 1;
            //将升级区域数组中的值填充到升级区域下拉框中
            for (var i = 0; i < project_area.length; i++) {
                slt_area[i + 1] = new Option(project_area[i], project_area[i]);
            }
        }
    </script>
    <script>
        var obj = { x: 1, y: 2, z: 3 }
        obj[Symbol.iterator] = function* () {
            yield 1; yield 2; yield 3;
        }
        console.log([...obj]); // 打印 [1, 2, 3]
    </script>
    <ul class="ul">
        <li>列表解决</li>
        <li>水平</li>
        <li>的</li>
        <li>空白</li>
        <li>间隙</li>
    </ul>
</body>

</html>